#pragma once

typedef enum {
	NO_OP,
	PUSH,
	POP,
	ADD,
	IFEQ,
	JUMP,
	PRINT,
	DUP,
	END,
} operator_t;

typedef struct push_data {
	int num;
} push_data;

typedef struct pop_data {
	char reg;
} pop_data;

typedef struct ifeq_data {
	int address;
} ifeq_data;

typedef struct jump_data {
	int address;
} jump_data;

typedef struct command_c {
	operator_t type;
	union {
		struct push_data push_d;
		struct pop_data pop_d;
		struct ifeq_data ifeq_d;
		struct jump_data jump_d;
	};
	int line_number;
} command_c;
